import request from '@/utils/request'

// 查询task列表
export function tasks(data) {
  return request({
    url: 'workflow/cmd/v1/task',
    method: 'post',
    data
  })
}

// 审批任务
export function apply(data) {
  return request({
    url: 'workflow/cmd/v1/task/apply',
    method: 'post',
    data
  })
}

// 任务审批记录
export function taskHistorical(id) {
  return request({
    url: 'workflow/cmd/v1/task/his/' + id,
    method: 'get'
  })
}

// 拒绝任务
export function reject(data) {
  return request({
    url: 'workflow/cmd/v1/task/reject',
    method: 'post',
    data
  })
}
